<div wire:poll.5000ms>
    <x-bladewind.centered-content size="small">
        @foreach($this->sessions as $session)
            <x-bladewind.card>
                {{ App\Models\User::query()->where('id', '=', $session->user_id)->first()->email }}
                {{ date('Y-m-d H:i:s',$session->start_time) }}
                {{ \App\Models\ConnectionsTypesModel::query()->where('id', '=', $session->connection_id )->first()->connection}}
                {{ $session->type }}
                @if($session->active)
                    <x-bladewind.button color="red"  wire:click="close({{ $session->id }})">
                        Закрыть сессию
                    </x-bladewind.button>
                @endif
                <a href="{{ route('server.admin.session.view', ['ip' => $this->server->ip_address, 'id' => $session->id]) }}">
                    <x-bladewind.button>
                        Открыть сессию
                    </x-bladewind.button>
                </a>
            </x-bladewind.card>
            <br>
        @endforeach
    </x-bladewind.centered-content>
</div>

